package com.xdhl.fu.fi.utils;

import com.xdhl.fu.flight.info.api.domain.FlightStock;
import org.springframework.stereotype.Component;

/**
 * 缓存键前缀
 *
 * @author 朱力维
 * @time 2022/6/11 16:30
 */
@Component
public class CacheKeyPrefix {

    /**
     * 获取缓存前缀
     *
     * @param scheduleDataId 航班计划数据ID
     * @return 座位缓存前缀
     */
    public String getSeatCachePrefix(String scheduleDataId) {
        return String.format("%s:%s:",
                FlightStock.class.getSimpleName(),
                scheduleDataId
        );
    }

}
